#ifndef _EEPROM_H_
#define _EEPROM_H_

#include "stm32f10x.h"
#include "platform_config.h"


/* I2C speed type */
typedef enum {
	I2C_STANDARD_MODE,
	I2C_HIGHSPEED_MODE,
} i2c_mode_t;


extern int E2PROM_open(uint8 sub_addr_lenb, uint8 dev_addr);
extern int E2PROM_read(uint32 sub_addr, uint8 * buf, uint32 len);
extern int E2PROM_write(uint32 sub_addr, const uint8 * buf, uint32 len);
extern void E2PROM_wp_enable(void);
extern void E2PROM_wp_disable(void);
extern int E2PROM_close(void); 


#endif /* _EEPROM_H_ */
